﻿using strange.extensions.context.api;
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.mediation.impl;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GameOverView : View {

    public Button But_Exit;
    public Button But_ResStartGame;
    public Text txt_Player;
    public Text txt_ComputerLeft;
    public Text txt_ComputerRight;
    [Inject(ContextKeys.CONTEXT_DISPATCHER)]
    public IEventDispatcher dispatcher { get; set; }
    /// <summary>
    /// 重新游戏
    /// </summary>
    public void OnReStart()
    {
        dispatcher.Dispatch(ViewEvent.ReStartGame);
        Destroy(gameObject);
    }
    /// <summary>
    /// 退出游戏
    /// </summary>
    public void OnExit()
    {
        Application.Quit();
    }
}
